home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1984 September
/
1984-09.d64
/
disk tricks 1
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
933b
|
21 lines
100 sys65517:ifpeek(781)=22thenmt$="":goto500
110 mt$=""
500 print"[147]"mt$" warning"
501 print" this program will":print" change the disk"
502 print" name. please make":print" sure that the"
503 print" gazette disk[146] is not":print" in the drive."
998 fori=1to6000:next
999 rem end: rem program 1: change disk name
1000 input "[147]new disk name";dn$
1010 if len(dn$)<16 then dn$=dn$+chr$(160):goto 1010:rem stretch to 16 chars
1020 if len(dn$) > 16 then dn$=left$(dn$,16): rem shorten name to 16 characters
1030 open 15,8,15,"i": rem open disk command channel
1040 open 8,8,8,"#": rem open direct access channel
1050 print#15, "u1:"8;0;18;0: rem read track 18, sector 0 into channel 8 buffer
1060 print#15, "b-p:"8;144: rem move buffer-pointer to first byte of disk name
1070 print#8, dn$;: rem put new name in channel 8 buffer, replacing old name
1080 print#15,"u2:"8;0;18;0:rem write buffer with name changed
1090 close 8: rem close direct access channel
1100 close15: rem close command channel
1110 rem goto 100: rem restart display t&s program if appended